package com.suanfa8.controller;

import com.suanfa8.entity.Company;
import com.suanfa8.service.ICompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author liwei
 * @date 2023/10/23
 */
@RestController
@RequestMapping("/company")
public class CompanyController {

    @Autowired
    private ICompanyService companyService;

    // http://localhost:8888/company/list
    @GetMapping("/list")
    public List<Company> selectAll(){
        return companyService.list();
    }

}
